package com.wunong.smart.bigdata.flink.data;

import lombok.Data;

@Data
public class TimestampData {

    private Integer id;

    private Object data;

    private Long timestamp;

    public static TimestampData create(Integer id) {
        return create(id, id);
    }

    public static TimestampData create(Integer id, Object data) {
        return create(id, data, System.currentTimeMillis());
    }

    public static TimestampData create(Integer id, Object data, Long timestamp) {
        TimestampData timestampData = new TimestampData();
        timestampData.setId(id);
        timestampData.setData(data);
        timestampData.setTimestamp(timestamp);
        return timestampData;
    }
}